package com.wendy.thirdpartyaccess.wechat;

import com.wendy.thirdpartyaccess.SocialConstants;
import org.springframework.social.oauth2.AbstractOAuth2ServiceProvider;

/**
 * @author zhuwending
 */
public class WechatServiceProvider extends AbstractOAuth2ServiceProvider<Wechat> {

    WechatServiceProvider(String appId, String appSecret) {
        super(new WechatOauth2Template(appId, appSecret, SocialConstants.URL_AUTHORIZE, SocialConstants.URL_ACCESS_TOKEN));
    }

    @Override
    public Wechat getApi(String accessToken) {
        return new WechatImpl(accessToken);
    }
}
